<?php
class Mobile_IndexController extends  Zgome_Controller{
	public function init(){
        parent::init();
	}

    public function indexAction(){
    $this->view->headScript()->offsetSetFile("4",$this->view->baseUrl(). "/public/common/js/jquery.touchslider.js","text/javascript");
		$gameId = 1; 
		if($gameId!=null){
			$gameModel = new Model_Game();
			$this->view->game = $gameModel->getGameById($gameId);
			$this->view->game =$this->view->game[0];
			//$this->view->gameLists = $gameModel->listall();
			$filePath = "public/common/game/".$this->view->game['install_file'];
			
			$this->view->install_file_size = file_exists($filePath) ?  round(filesize($filePath)/1024/1024, 1) : 0 ;
			$this->view->url =$this->view->serverUrl().$this->getRequest()->getRequestUri();
			$this->view->images = $gameModel->getGameImageById($gameId);
			
		}
		else{
			$this->_redirect("/mobile");
		}
    }
}
?>